package org.example.service.Impl;

import org.example.dao.UserDao;
import org.example.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Component;

@Component
public class UserServiceImpl implements UserService {
    UserDao userDao ;

    @Autowired
    //有多个命名，指定某一个
    @Qualifier("userDao1Impl")
    public void setUserDao(UserDao userDao) {
        this.userDao = userDao;
    }

    public void save() {
        userDao.save();

    }

    public void getList() {
        userDao.getList();
    }
}
